#region License Revision: 0 Last Revised: 6/18/2008 11:00 AM
/******************************************************************************
Copyright (c) Microsoft Corporation.  All rights reserved.


This file is licensed under the Microsoft Public License (Ms-PL). A copy of the Ms-PL should accompany this file. 
If it does not, you can obtain a copy from: 

http://www.microsoft.com/resources/sharedsource/licensingbasics/publiclicense.mspx
******************************************************************************/
#endregion // License
using System;
using System.Windows.Browser;
using System.Diagnostics;
using System.Text;
using ScriptInterop;
using System.Globalization;

namespace VIEWS // Virtual Earth Wrapper
{
    /// <summary>Contains the specification for importing a 3D model onto the map.</summary>
	public class VEModelSourceSpecification : JSObject
	{
		/// <summary>String holding JavaScript class name</summary>
		private static string thisClass = "VEModelSourceSpecification";
		
		/// <summary>Get the JavaScript class name</summary>
		/// <returns type="String">The class name used in JavaScript </returns>		
		public override string ClassName
		{
			get { return thisClass; }
		}

        #region Constructors
        /// <summary>Construct a C# wrapper from a ScriptObject</summary>
        public VEModelSourceSpecification(ScriptObject so) : base(so) { }

        /// <summary>Initializes a new instance of the VEModelSourceSpecification Class.</summary>
        /// <param name="modelFormat">
        /// A <see cref="VEModelFormat"/> enumeration specifying the data format of the 3D model being imported.
        /// </param>
        /// <param name="modelSource">
        /// The longitude of a single point on the globe.
        /// </param>
        /// <param name="layer">
        /// The altitude of a single point on the globe.
        /// </param>
        public VEModelSourceSpecification(VEModelFormat modelFormat, string modelSource, VEShapeLayer layer)
        { ScriptObject = CreateClass(ScriptEnumConverter.ToString(modelFormat), modelSource, layer); }

        #endregion // Constructors

        #region Public Properties
        /// <summary>
        /// A <see cref="VEModelFormat"/> enumeration value specifying the data format of the 3D model being imported.
        /// </summary>		
        public VEModelFormat Format
        {
            get { return ScriptEnumConverter.ToModelFormat(GetProperty<string>("Format")); }
            set { SetProperty("Format", ScriptEnumConverter.ToString(value)); }
        }

        /// <summary>
        /// A <see cref="VEShapeLayer"/> specifying the shape layer into which the 3D model will be imported.
        /// </summary>		
        public VEShapeLayer Layer
        {
            get { return GetProperty<VEShapeLayer>("Layer"); }
            set { SetProperty("Layer", value); }
        }

        /// <summary>
        /// A string specifying the URL of the 3D model data file.
        /// </summary>		
        public string ModelSource
        {
            get { return GetProperty<string>("ModelSource"); }
            set { SetProperty("ModelSource", value); }
        }
        #endregion // Public Properties
	};
}
